class Main extends egret.DisplayObjectContainer {


    private mc: egret.MovieClip;
    private BG: egret.Bitmap;
    private title: egret.Bitmap;
    private centerPic_clone: egret.Bitmap;
    private centerPic: egret.Bitmap;

    private word1;
    private word11;

    private word2;
    private word3;

    private word44;
    private word444;

    private hanzi_clone;

    private arr_hanzi;

    private hanzi1;
    private hanzi2;
    private hanzi3;
    private hanzi4;
    private hanzi5;

    private btn_draw: egret.Bitmap;
    private hajime: Hajime;

    private arr_RTObject;
    private arr_RTObject_clone;

    private sound: egret.Sound;
    private loadingUI: LoadingUI;

    private stageNo: number;

    private num: number;


    private bl_over;
    private pic_hand;


    private musicControl: MusicControl;
    private logo_last:egret.Bitmap;
    


    public constructor() {
        super();
        MyData.initial();

        this.hajime = new Hajime();
        this.hajime.addEventListener(LoadEvent.LoadingLoad, this.LoadingLoadComplete, this);
        this.hajime.addEventListener(LoadEvent.LoadingProgress, this.LoadingLoadProgress, this);

        this.addEventListener(egret.Event.ADDED_TO_STAGE, this.ATS, this);

        this.stageNo = 1;
        this.bl_over = false;

        MyData.bala = true;

        StartMusic();
    }
    private ATS(e: egret.Event) {
        var mthis = this;
        setTimeout(function () {
            mthis.stage.addEventListener(egret.TouchEvent.TOUCH_BEGIN, mthis.TB, mthis);
        }, 2000);
        this.num = 700;
    }
    private TB(e: egret.TouchEvent) {

        if (MyData.bala) {

            this.stageNo++;
            var myThis = this;
            this.stage.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.TB, this);
            setTimeout(function () {
                myThis.stage.addEventListener(egret.TouchEvent.TOUCH_BEGIN, myThis.TB, myThis);
            }, 1500);


            switch (this.stageNo) {

                // case 2: egret.Tween.get(myThis.arr_RTObject[1]).to({alpha:1},700,egret.Ease.cubicInOut);
                // myThis.arr_RTObject[1].StartRT(1,2.5);
                // break;

                case 2:
                    egret.Tween.get(myThis.arr_RTObject[1]).to({ alpha: 1 }, 700, egret.Ease.cubicInOut);
                    myThis.arr_RTObject[1].StartRT(1, 2.5);
                    egret.Tween.get(myThis.arr_RTObject[0]).to({ alpha: 1 }, 1200, egret.Ease.cubicInOut);
                    myThis.arr_RTObject[0].StartRT(0.5, -1.5);

                    egret.Tween.get(myThis.arr_RTObject[2]).to({ alpha: 1 }, 1200, egret.Ease.cubicOut);
                    myThis.arr_RTObject[2].StartRTSpe(100, true);

                    // //底部图片1
                    // egret.Tween.get(this.word1)
                    //     .wait(500)
                    //     .to({ y: 836, alpha: 1 }, 1000, egret.Ease.cubicOut)

                    //底部图片2
                    egret.Tween.get(this.word11)
                        .wait(850)
                        .to({ y: 886, alpha: 1 }, 700, egret.Ease.cubicOut)






                    break;

                case 3:
                    egret.Tween.get(myThis.arr_RTObject[3]).to({ alpha: 1 }, 1200, egret.Ease.cubicOut);
                    myThis.arr_RTObject[3].StartRTSpe(250, true);
                    myThis.arr_RTObject[3].StartRT(0.5, 1);
                    setTimeout(function () {
                        egret.Tween.get(myThis.arr_RTObject[4]).to({ alpha: 1 }, 1200, egret.Ease.cubicOut);
                        myThis.arr_RTObject[4].StartRTSpe(150, true);
                    }, 1000);

                    // egret.Tween.get(myThis.word1)
                    //     .to({ y: 806, alpha: 0 }, 700, egret.Ease.cubicOut)
                    egret.Tween.get(myThis.word11)
                        .wait(250)
                        .to({ y: 856, alpha: 0 }, 700, egret.Ease.cubicOut)
                    egret.Tween.get(myThis.word2)
                        .wait(550)
                        .to({ y: 846, alpha: 1 }, 700, egret.Ease.cubicOut)

                    break;


                case 4:
                    egret.Tween.get(myThis.arr_RTObject[5]).to({ alpha: 1 }, 1200, egret.Ease.cubicOut);
                    myThis.arr_RTObject[5].StartRTSpe(100, true);
                    egret.Tween.get(myThis.arr_RTObject[6]).to({ alpha: 1 }, 1200, egret.Ease.cubicOut);
                    myThis.arr_RTObject[6].StartRTSpe(80, true);


                    egret.Tween.get(myThis.word2)
                        .wait(250)
                        .to({ y: 806, alpha: 0 }, 700, egret.Ease.cubicOut)
                    egret.Tween.get(myThis.word3)
                        .wait(550)
                        .to({ y: 846, alpha: 1 }, 700, egret.Ease.cubicOut)
                    break;

                case 5:

                    this.End();
                    // egret.Tween.get(myThis.arr_hanzi[4]).to({ alpha: 0 }, 200, egret.Ease.cubicOut);
                    // egret.Tween.get(myThis.arr_hanzi[5]).wait(100).to({ alpha: 1 }, 200, egret.Ease.cubicOut);




                    // egret.Tween.get(this.arr_hanzi[0]).to({alpha:1},300);

                    break;

                // case 8:this.End();break;
            }
        }
    }

    private LoadingLoadComplete(): void {
        this.loadingUI = new LoadingUI();
        this.addChild(this.loadingUI);
    }
    private LoadingLoadProgress(event: egret.Event): void {
        this.loadingUI.setProgress(event.data[0], event.data[1]);
    }

    private data;
    private txtr;
    private mcFactory: egret.MovieClipDataFactory;

    public LoadComplete() {
        var myThis = this;
        this.data = RES.getRes("glow_json");
        this.txtr = RES.getRes("glow_png");
        this.mcFactory = new egret.MovieClipDataFactory(this.data, this.txtr);
        this.mc = new egret.MovieClip(this.mcFactory.generateMovieClipData("LOGO"));
        this.mc.frameRate = 30;
        // this.mc.addEventListener(egret.Event.LOOP_COMPLETE,this.loopHandler,this);



        this.BG = new egret.Bitmap(RES.getRes("BG_jpg"));
        this.addChild(this.BG);
        this.centerPic = new egret.Bitmap(RES.getRes("CenterPic_png"));
        this.centerPic.anchorOffsetX = this.centerPic.width / 2;
        this.centerPic.anchorOffsetY = this.centerPic.height / 2;
        this.centerPic.x = 740 / 2;
        this.centerPic.y = 1136 / 2 - 100;
        this.addChild(this.centerPic);
        this.centerPic.alpha = 0;
        this.centerPic.scaleX = 0.5;
        this.centerPic.scaleY = 0.5;


        this.logo_last=new egret.Bitmap(RES.getRes("logo_last_png"));
        this.logo_last.scaleX=0.4;this.logo_last.scaleY=0.4;
        this.logo_last.x=680;this.logo_last.y=755;
        this.logo_last.alpha=0;
        this.addChild(this.logo_last);

        this.centerPic_clone = new egret.Bitmap(RES.getRes("CenterPic_png"));
        this.centerPic_clone.anchorOffsetX = this.centerPic.width / 2;
        this.centerPic_clone.anchorOffsetY = this.centerPic.height / 2;
        this.centerPic_clone.x = 740 / 2;
        this.centerPic_clone.y = 700;
        this.addChild(this.centerPic_clone);
        this.centerPic_clone.alpha = 0;


        this.pic_hand = new egret.Bitmap(RES.getRes("hand_png"));
        this.pic_hand.x = 370; this.pic_hand.y = 800;
        this.pic_hand.anchorOffsetX = this.pic_hand.width / 2; this.pic_hand.anchorOffsetY = this.pic_hand.height / 2;
        egret.Tween.get(this.pic_hand, { loop: true }).to({ scaleX: 0.8, scaleY: 0.8 }, 400, egret.Ease.cubicInOut).to({ scaleX: 1, scaleY: 1 }, 500, egret.Ease.cubicInOut);
        this.addChild(this.pic_hand);

        this.musicControl = new MusicControl(true);
        this.addChild(this.musicControl);
        this.musicControl.x = 740-70; this.musicControl.y = 65;
        this.musicControl.scaleX = 0.3; this.musicControl.scaleY = 0.3;


        this.title = new egret.Bitmap(RES.getRes("title1_png"));
        // this.word1 = new egret.Bitmap(RES.getRes("word1_png"));
        this.word11 = new egret.Bitmap(RES.getRes("wordg1_png"));
        this.word2 = new egret.Bitmap(RES.getRes("wordg2_png"));
        this.word3 = new egret.Bitmap(RES.getRes("wordg3_png"));
        // this.word44 = new egret.Bitmap(RES.getRes("word44_png"));
        this.word444 = new egret.Bitmap(RES.getRes("wordg4_png"));
        this.title.x = 200; this.title.y = 100;
        // this.word1.x = 230; this.word1.y = 786;
        this.word11.x = 370; this.word11.y = 846;
        this.word2.x = 370; this.word2.y = 886;
        this.word3.x = 370; this.word3.y = 886;
        // this.word44.x = 230 - 12; this.word44.y = 586;
        this.word444.x = 370; this.word444.y = 586;

        this.word11.scaleX = 0.5; this.word11.scaleY = 0.5; this.word11.anchorOffsetX = this.word11.width / 2;
        this.word2.scaleX = 0.5; this.word2.scaleY = 0.5; this.word2.anchorOffsetX = this.word2.width / 2;
        this.word3.scaleX = 0.5; this.word3.scaleY = 0.5; this.word3.anchorOffsetX = this.word3.width / 2;
        this.word444.scaleX = 0.5; this.word444.scaleY = 0.5; this.word444.anchorOffsetX = this.word444.width / 2;

        this.addChild(this.title);
        // this.addChild(this.word1);
        this.addChild(this.word11);
        this.addChild(this.word2);
        this.addChild(this.word3);
        // this.addChild(this.word44);
        this.addChild(this.word444);
        this.title.alpha = 0;
        // this.word1.alpha = 0;
        this.word11.alpha = 0;
        this.word2.alpha = 0;
        this.word3.alpha = 0;
        // this.word44.alpha = 0;
        this.word444.alpha = 0;

        this.arr_hanzi = new Array();

        for (var z = 1; z <= 6; z++) {
            var hanzi = new egret.Bitmap(RES.getRes("hanzi" + z + "_png"));
            this.addChild(hanzi);
            if (z == 6) {
                hanzi.x = 740 / 2 - hanzi.width / 2 + 3;
            }
            else {
                hanzi.x = 740 / 2 - hanzi.width / 2;
            }

            hanzi.y = 1136 / 2 - 100 - hanzi.height / 2;
            hanzi.alpha = 0;
            if (z == 1) { hanzi.alpha = 1 };
            this.arr_hanzi.push(hanzi);


        }

        this.HanziInfinity();


        this.hanzi_clone = new egret.Bitmap(RES.getRes("hanzi7_png"));
        this.hanzi_clone.x = 740 / 2 - hanzi.width / 2 - 3;
        this.addChild(this.hanzi_clone);
        this.hanzi_clone.alpha = 0;

        // this.hanzi2=new egret.Bitmap(RES.getRes("hanzi2_png"));
        // this.addChild(this.hanzi2);
        // this.hanzi2.x=740/2-this.hanzi2.width/2;this.hanzi2.y=1136/2-100-this.hanzi2.height/2;

        // this.hanzi3=new egret.Bitmap(RES.getRes("hanzi3_png"));
        // this.addChild(this.hanzi3);
        // this.hanzi3.x=740/2-this.hanzi1.width/2;this.hanzi1.y=1136/2-100-this.hanzi1.height/2;

        // this.hanzi1=new egret.Bitmap(RES.getRes("hanzi1_png"));
        // this.addChild(this.hanzi1);
        // this.hanzi1.x=740/2-this.hanzi1.width/2;this.hanzi1.y=1136/2-100-this.hanzi1.height/2;

        // this.hanzi1=new egret.Bitmap(RES.getRes("hanzi1_png"));
        // this.addChild(this.hanzi1);
        // this.hanzi1.x=740/2-this.hanzi1.width/2;this.hanzi1.y=1136/2-100-this.hanzi1.height/2;

        // this.btn_draw=new egret.Bitmap(RES.getRes("result1_jpg"));
        // this.btn_draw.width=100;
        // this.btn_draw.height=100;
        // this.btn_draw.anchorOffsetX=this.btn_draw.width/2;
        // this.btn_draw.anchorOffsetY=this.btn_draw.height/2;
        // this.btn_draw.x=this.width/2;
        // this.btn_draw.y=this.height/2;
        // this.btn_draw.touchEnabled=true;
        // this.addChild(this.btn_draw);
        // egret.Tween.get(this.btn_draw,{loop:true})
        // .to({scaleX:1.5,scaleY:1.5},1000)
        // .wait(100);

        // this.btn_draw.addEventListener(egret.TouchEvent.TOUCH_END,this.GoDraw,this);


        this.addEventListener(egret.Event.ENTER_FRAME, this.EF, this);

        this.CreateRT();

        this.Start();
        this.HanziChange();
        this.RTChange();

        // this.SoundPlay();
    }

    // private loopHandler(e:egret.Event):void
    // {
    //     console.log('sssssssssssss')
    // }

    private HanziInfinity() {
        if (!this.bl_over) {
            var myThis = this;
            egret.Tween.get(myThis.arr_hanzi[0]).to({ alpha: 1 }, 200, egret.Ease.cubicOut).wait(2000)
                .to({ alpha: 0 }, 200).call(function () {
                    egret.Tween.get(myThis.arr_hanzi[1]).to({ alpha: 1 }, 200, egret.Ease.cubicOut).wait(2000)
                        .to({ alpha: 0 }, 200).call(function () {
                            egret.Tween.get(myThis.arr_hanzi[2]).to({ alpha: 1 }, 200, egret.Ease.cubicOut).wait(2000)
                                .to({ alpha: 0 }, 200).call(function () {
                                    egret.Tween.get(myThis.arr_hanzi[3]).to({ alpha: 1 }, 200, egret.Ease.cubicOut).wait(2000)
                                        .to({ alpha: 0 }, 200).call(function () {
                                            egret.Tween.get(myThis.arr_hanzi[4]).to({ alpha: 1 }, 200, egret.Ease.cubicOut).wait(2000)
                                                .to({ alpha: 0 }, 200).call(function () {
                                                    myThis.HanziInfinity();
                                                })
                                        })
                                })
                        })
                })
        }
    }

    private EF(evt: egret.Event) {
        this.centerPic.rotation -= 1;
        this.centerPic_clone.rotation -= 1;


        var myThis = this;
        var v = 700;

        if (this.num > 1000000) {
            this.num = 0;
        }

        if (this.num % v == 0) {

        }
        this.num++;

        // if (this.num > v * 6) {
        //     this.num = 0;
        // }
        // if (this.num % v == 0) {
        //     egret.Tween.get(myThis.arr_hanzi[0]).wait(100).to({ alpha: 0 }, 200, egret.Ease.cubicOut);
        //     egret.Tween.get(myThis.arr_hanzi[1]).wait(300).to({ alpha: 1 }, 200, egret.Ease.cubicOut);
        // }
        // if (this.num % (v * 2) == 0) {
        //     egret.Tween.get(myThis.arr_hanzi[1]).to({ alpha: 0 }, 200, egret.Ease.cubicOut);
        //     egret.Tween.get(myThis.arr_hanzi[2]).wait(100).to({ alpha: 1 }, 200, egret.Ease.cubicOut);
        // }
        // if (this.num % (v * 3) == 0) {
        //     egret.Tween.get(myThis.arr_hanzi[2]).to({ alpha: 0 }, 200, egret.Ease.cubicOut);
        //     egret.Tween.get(myThis.arr_hanzi[3]).wait(100).to({ alpha: 1 }, 200, egret.Ease.cubicOut);
        // }
        // if (this.num % (v * 4) == 0) {
        //     egret.Tween.get(myThis.arr_hanzi[3]).to({ alpha: 0 }, 200, egret.Ease.cubicOut);
        //     egret.Tween.get(myThis.arr_hanzi[4]).wait(100).to({ alpha: 1 }, 200, egret.Ease.cubicOut);
        // }




    }

    // private GoDraw(evt:egret.TouchEvent){
    //     console.log("GoDraw!!!");
    // }

    // private SoundPlay(){
    //     this.sound=new egret.Sound();
    //     var url="resource/sound/sound.mp3";
    //     this.sound.load(url);
    //     this.sound.addEventListener(egret.Event.COMPLETE,this.GoSound,this);
    // }
    // private GoSound(){
    //     this.sound.play(0,0);
    // }


    private HanziChange() {
        var myThis = this;
        // for(var z=0;z<4;z++){
        // egret.Tween.get(this.arr_hanzi[0]).wait(1900).to({alpha:0},200,egret.Ease.cubicOut);
        // egret.Tween.get(this.arr_hanzi[1]).wait(2000).to({alpha:1},200,egret.Ease.cubicOut);

        // setTimeout(function(){
        //      egret.Tween.get(myThis.arr_hanzi[1]).to({alpha:0},200,egret.Ease.cubicOut);
        //      egret.Tween.get(myThis.arr_hanzi[2]).wait(100).to({alpha:1},200,egret.Ease.cubicOut);
        // },2900)

        // setTimeout(function(){
        //      egret.Tween.get(myThis.arr_hanzi[2]).to({alpha:0},200,egret.Ease.cubicOut);
        //      egret.Tween.get(myThis.arr_hanzi[3]).wait(100).to({alpha:1},200,egret.Ease.cubicOut);
        // },3800)

        // setTimeout(function(){
        //      egret.Tween.get(myThis.arr_hanzi[3]).to({alpha:0},200,egret.Ease.cubicOut);
        //      egret.Tween.get(myThis.arr_hanzi[4]).wait(100).to({alpha:1},200,egret.Ease.cubicOut);
        // },4700)
        //  setTimeout(function(){
        //      egret.Tween.get(myThis.arr_hanzi[4]).to({alpha:0},200,egret.Ease.cubicOut);
        //      egret.Tween.get(myThis.arr_hanzi[5]).wait(100).to({alpha:1},200,egret.Ease.cubicOut);
        // },7000)
    }
    private RTChange() {
        var myThis = this;
        setTimeout(function () {

        }, 1200);

        // setTimeout(function(){
        //     egret.Tween.get(myThis.arr_RTObject[0]).to({alpha:1},1200,egret.Ease.cubicInOut);
        //     myThis.arr_RTObject[0].StartRT(0.5,-1.5);
        //     //  myThis.arr_RTObject[2].StartRTSpe(200,false);
        // },1700);

        // setTimeout(function(){
        //     egret.Tween.get(myThis.arr_RTObject[2]).to({alpha:1},1200,egret.Ease.cubicOut);
        //     myThis.arr_RTObject[2].StartRTSpe(100,true);
        // },2200);

        //  setTimeout(function(){
        //     egret.Tween.get(myThis.arr_RTObject[3]).to({alpha:1},1200,egret.Ease.cubicOut);
        //     myThis.arr_RTObject[3].StartRTSpe(250,true);
        //     myThis.arr_RTObject[3].StartRT(0.5,1);
        // },2600);

        //   setTimeout(function(){
        //     egret.Tween.get(myThis.arr_RTObject[4]).to({alpha:1},1200,egret.Ease.cubicOut);
        //     myThis.arr_RTObject[4].StartRTSpe(150,true);
        // },4000);
        //   setTimeout(function(){
        //     egret.Tween.get(myThis.arr_RTObject[5]).to({alpha:1},1200,egret.Ease.cubicOut);
        //     myThis.arr_RTObject[5].StartRTSpe(100,true);
        // },5000);
        //   setTimeout(function(){
        //     egret.Tween.get(myThis.arr_RTObject[6]).to({alpha:1},1200,egret.Ease.cubicOut);
        //     myThis.arr_RTObject[6].StartRTSpe(80,true);
        // },5700);
    }

    private Start() {

        //当中的图片
        egret.Tween.get(this.centerPic)
            .to({ alpha: 1, scaleX: 1, scaleY: 1 }, 1000, egret.Ease.backOut);

        //最上方标题
        egret.Tween.get(this.title)
            .wait(500)
            .to({ y: 50, alpha: 1 }, 1000, egret.Ease.cubicOut)




        //   var myThis=this;
        //  setTimeout(function(){
        //     egret.Tween.get(myThis.word1)
        //     .to({y:806,alpha:0},700,egret.Ease.cubicOut) 
        //     egret.Tween.get(myThis.word11)
        //     .wait(250)
        //     .to({y:856,alpha:0},700,egret.Ease.cubicOut) 
        //     egret.Tween.get(myThis.word2)
        //     .wait(550)
        //     .to({y:846,alpha:1},700,egret.Ease.cubicOut)
        //  },2500)

        //  setTimeout(function(){
        //     egret.Tween.get(myThis.word2)
        //     .wait(250)
        //     .to({y:806,alpha:0},700,egret.Ease.cubicOut) 
        //     egret.Tween.get(myThis.word3)
        //     .wait(1350)
        //     .to({y:846,alpha:1},700,egret.Ease.cubicOut)
        //  },5600)


    }


    //旋转圈
    private CreateRT() {

        this.arr_RTObject = new Array();
        for (var z = 1; z <= 7; z++) {
            var RTObj = new RTObject();
            RTObj = new RTObject();
            this.addChild(RTObj);
            RTObj.alpha = 0;
            this.arr_RTObject.push(RTObj);
            switch (z) {
                case 1: RTObj.Initial("RTObject" + z + "_png", "B", 6, 150, 220, 0.5, 0); break;
                case 2: RTObj.Initial("RTObject" + z + "_png", "S", 12, 250, 120, 0.75, 0); break;
                case 3: RTObj.Initial("RTObject" + z + "_png", "S", 24, 100, 100, 2, 0); RTObj.ZF(false); break;
                case 4: RTObj.Initial("RTObject" + z + "_png", "S", 6, -50, -100, 0.5, 20); break;
                case 5: RTObj.Initial("RTObject" + z + "_png", "B", 6, 260, 260, 0.5, 20); break;
                case 6: RTObj.Initial("RTObject" + z + "_png", "B", 6, 220, 220, 0.5, -10); break;
                case 7: RTObj.Initial("RTObject" + z + "_png", "B", 6, 245, 245, 0.5, -10); break;
            }
        }
        this.arr_RTObject_clone = new Array();
        for (var y = 1; y <= 7; y++) {
            var RTObj_clone = new RTObject();
            RTObj_clone = new RTObject();
            this.addChild(RTObj_clone);
            RTObj_clone.alpha = 1;
            RTObj_clone.y = 1000;
            this.arr_RTObject_clone.push(RTObj_clone);
            switch (y) {
                case 1: RTObj_clone.Initial("RTObject" + y + "_png", "B", 6, 220, 220, 0.5, 0); break;
                case 2: RTObj_clone.Initial("RTObject" + y + "_png", "S", 12, 120, 120, 0.75, 0); break;
                case 3: RTObj_clone.Initial("RTObject" + y + "_png", "S", 24, 100, 100, 2, 0); RTObj_clone.ZF(false); break;
                case 4: RTObj_clone.Initial("RTObject" + y + "_png", "S", 6, -100, -100, 0.5, 20); break;
                case 5: RTObj_clone.Initial("RTObject" + y + "_png", "S", 6, 260, 260, 0.5, 20); break;
                case 6: RTObj_clone.Initial("RTObject" + y + "_png", "S", 6, 220, 220, 0.5, -10); break;
                case 7: RTObj_clone.Initial("RTObject" + y + "_png", "S", 6, 245, 245, 0.5, -10); break;
            }
        }


    }

    private End() {
        var myThis = this;

        egret.Tween.get(this.logo_last).wait(2500).to({alpha:1,x:660},700,egret.Ease.cubicOut);

        // setTimeout(function(){
        egret.Tween.resumeTweens(myThis.word2);
        egret.Tween.removeTweens(myThis.word3);
        egret.Tween.removeTweens(myThis.pic_hand);
        myThis.pic_hand.alpha = 0;

        egret.Tween.get(myThis.word2)
            .wait(250)
            .to({ y: 806, alpha: 0 }, 700, egret.Ease.cubicOut)

        egret.Tween.get(myThis.word3)
            .to({ y: 806, alpha: 0 }, 700, egret.Ease.cubicOut)

        egret.Tween.get(myThis.title).wait(400).to({ alpha: 0, y: 0 }, 700, egret.Ease.cubicOut);


        egret.Tween.get(myThis.centerPic).wait(400).to({ y: 30 }, 1000, egret.Ease.cubicInOut);

        // for (var i = 0; i < myThis.arr_hanzi.length; i++) {
        //     egret.Tween.get(myThis.arr_hanzi[i]).wait(400).to({ y: 8 }, 1000, egret.Ease.cubicInOut)
        // }
        for (var z = 0; z < this.arr_hanzi.length; z++) {
            this.arr_hanzi[z].alpha = 0;
            egret.Tween.removeTweens(this.arr_hanzi[z]);
        }
        this.bl_over = true;

        this.arr_hanzi[0].texture = RES.getRes("hanzi7_png");
        this.arr_hanzi[0].alpha = 1;
        this.arr_hanzi[0].x -= 3;
        egret.Tween.get(this.arr_hanzi[0]).wait(400).to({ y: 8 }, 1000, egret.Ease.cubicInOut)


        for (var z = 0; z < myThis.arr_RTObject.length; z++) {
            egret.Tween.get(myThis.arr_RTObject[z]).wait(400).to({ y: -450 }, 1000, egret.Ease.cubicInOut);
        }
        // },9800)

        setTimeout(function () {


            // myThis.mc= new egret.MovieClip( myThis.mcFactory.generateMovieClipData( "LOGO" ) );
            myThis.addChild(myThis.mc);
            myThis.mc.gotoAndPlay("glow", -1);
            myThis.mc.y = 468 + 25;
            myThis.mc.x = 246 - 6;
            egret.Tween.get(myThis.mc).to({ alpha: 1, y: 255 + 65 }, 800, egret.Ease.cubicOut);

            // myThis.title.y=468;
            // myThis.title.x=260;
            // myThis.title.texture=RES.getRes("title2_png");
            // egret.Tween.get(myThis.title).to({alpha:1,y:300},800,egret.Ease.cubicOut);

            // egret.Tween.get(myThis.word44).wait(200).to({ alpha: 1, y: 536 + 60 }, 700, egret.Ease.cubicOut)
            egret.Tween.get(myThis.word444).wait(400).to({ alpha: 1, y: 586 + 35 }, 500, egret.Ease.cubicOut)


            for (var y = 0; y < myThis.arr_RTObject_clone.length; y++) {
                myThis.arr_RTObject_clone[y].y = 1000;
                egret.Tween.get(myThis.arr_RTObject_clone[y]).wait(400).to({ alpha: 1, y: 650 }, 1000, egret.Ease.cubicInOut);
            }

            myThis.hanzi_clone.y = 1400;
            myThis.centerPic_clone.y = 1400;

            myThis.centerPic_clone.alpha = 0;
            egret.Tween.get(myThis.hanzi_clone).wait(400).to({ alpha: 1, y: 1085 }, 1000, egret.Ease.cubicInOut);
            egret.Tween.get(myThis.centerPic_clone).wait(400).to({ alpha: 1, y: 1110 }, 1000, egret.Ease.cubicInOut);
        }, 1100)
    }

}
declare function StartMusic()
